using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;

namespace XnaDevRu.ContentBuilder.Framework
{
	/// <summary>
	/// Represents target platforms' conversion to string collection.
	/// </summary>
	public class TargetPlatformConverter : StringConverter
	{
		/// <summary>
		/// 
		/// </summary>
		/// <param name="context"></param>
		/// <returns></returns>
		public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
		{
			//true means show a combobox
			return true;
		}

		/// <summary>
		/// 
		/// </summary>
		/// <param name="context"></param>
		/// <returns></returns>
		public override bool GetStandardValuesExclusive(ITypeDescriptorContext context)
		{
			//true will limit to list. false will show the list, 
			//but allow free-form entry
			return true;
		}

		/// <summary>
		/// 
		/// </summary>
		/// <param name="context"></param>
		/// <returns></returns>
		public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
		{
			string[] platforms = new string[2];
			platforms[0] = @"Windows";
			platforms[1] = @"Xbox360";
			return new StandardValuesCollection(platforms);
		}
	}
}
